
#ifndef __AMOUNT_H__
#define __AMOUNT_H__

#include <ostream>

class Unit;
class OutFormat;

class Amount
{
public:
	Amount(int value, const Unit& metric);

	bool operator ==(Amount & amount) const;
	bool operator !=(Amount & amount) const;
	Amount operator +(Amount & amount) const;

	void formatString(std::ostream& out, OutFormat& outFormat) const;
	static  Amount & getInvalidData() ;
	friend class Formatter;

private:
	int getNormalizedAmount() const;
	const Unit& getBaseUnit() const;

	int value_m;
	const Unit& metric_m;
};

#define INVALID_DATA  Amount::getInvalidData()


#endif


